package page58;

public class Test2 {
    public static void main(String[] args) {
        int n = 100;
        int i, j;
        for (i = 2; i <= n; i++) {
            for (j = 2; j <= Math.sqrt(i); j++) {
                if (i % j == 0) {
                    break;
                }
            }
            if (j > Math.sqrt(i))
                System.out.printf("%d ",i);
        }
    }
}
